﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Api.BLL
{
    public class CategoryBLL
    {
        /// <summary>
        /// 子类数据访问类对象
        /// </summary>
        CategoryDAL childDAL = null;

        #region 重写父类的抽象方法
        /// <summary>
        /// 重写父类的抽象方法
        /// </summary>
        protected void SetDAL()
        {
            childDAL = new CategoryDAL();
            dal = childDAL;//为父类变量赋值
        }
        #endregion

        #region 當前類業務類對象
        /// <summary>
        /// 當前類業務類對象
        /// </summary>
        public static CategoryBLL CurrBLL
        {
            get
            {
                string name = typeof(CategoryBLL).Name;
                CategoryBLL bll = CallContext.GetData(name) as CategoryBLL;
                if (bll != null)
                {
                    return bll;
                }
                else
                {
                    bll = new CategoryBLL();
                    CallContext.SetData(name, bll);
                    return bll;
                }
            }
        }
        #endregion
    }
}
